#ifndef RECORD_UTIL_H
#define RECORD_UTIL_H
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <sstream>
#include "hithread.h"

using namespace std;
class RecordUtil:public HiThread
{
public:
    RecordUtil();
    ~RecordUtil();    

public:
    void start_record(int& unicode, string& user, string& flowUrl, string& path, string& callbackurl, string& otherParam);
    void stop_record();    
    string get_user() { return user_; }

protected:
    void process();

private:   
    int unicode_;
    string user_;
    string flowUrl_;
    string path_;
    string callbackurl_;
    string otherParam_;
    FILE *fp_;
    pid_t pid_;
    int fd[2];
    bool runflag_;
};

#endif //RECORD_UTIL_H